all: server client

GLMLITE=../lib/glMLite-0.03.50/SRC
OCAML_CHIPMUNK=../lib/OCaml-Chipmunk-0.05
CHIPMUNK=../lib/Chipmunk-5.3.4/src

LIBS=chipmunk.cmxa GL.cmxa Glu.cmxa Glut.cmxa str.cmxa unix.cmxa threads.cmxa -cclib -lGL
INCLUDES=-I $(GLMLITE) -I $(OCAML_CHIPMUNK) -ccopt -L$(GLMLITE) -ccopt -L$(OCAML_CHIPMUNK) -ccopt -L$(CHIPMUNK)

server: Types.cmx Config.cmx Player.cmx Object.cmx GameEngine.cmx Server.cmx
	ocamlopt -thread $(INCLUDES) $(LIBS) -o $@ $+

client: Types.cmx Config.cmx Player.cmx Object.cmx Client.cmx
	ocamlopt -thread $(INCLUDES) $(LIBS) -o $@ $+

%.cmx: %.ml
	ocamlopt -thread $(INCLUDES) $(LIBS) -c -o $@ $+

clean:
	rm -f *.cmx *.cmi *.cmx

